/*
 *  opengl_main.h
 *  framework
 *
 *  Created by gerhard gubler on 17.11.09.
 *  Copyright 2009 md80.ch. All rights reserved.
 *
 */
#ifndef OPENGL_MAIN_H
#define OPENGL_MAIN_H
#include <OpenGL/gl.h>
#include <GLUT/glut.h>
#include <boost/thread.hpp>
#include <boost/bind.hpp>
#include "connector.h"
#include "midpanel.h"
#include <string>
#include "PrimaryFlightDisplay.h"

using boost::thread;
using std::string;

class opengl_main
{
	static string myvalue;
	static datavalues dvals;
	
	connector mycon;
	static midpanel mymidpanel;
	static float val;
	static PrimaryFlightDisplay pfd_disp;
	static int window1;
	static int window2;
	static int window3;

	public :
	opengl_main();
	 void get_going();
    static void caller();
	static void incr();
	static void decr();
	static void startup();
	static void shutdown();
	static void pfd_caller();
	void getnetdata();
	//void keyboard(unsigned char);
	template <typename T, typename S>
	inline T stream_cast(S const& val)
	{
		std::stringstream stream;
		stream << val;
		T rc;
		stream >> rc;
		return rc;
	}
};

#endif